/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bio.jpa.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego
 */
@Embeddable
public class ProjectHasUserPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "project_prj_id")
    private int projectPrjId;
    @Basic(optional = false)
    @Column(name = "user_user_id")
    private int userUserId;

    public ProjectHasUserPK() {
    }

    public ProjectHasUserPK(int projectPrjId, int userUserId) {
        this.projectPrjId = projectPrjId;
        this.userUserId = userUserId;
    }

    public int getProjectPrjId() {
        return projectPrjId;
    }

    public void setProjectPrjId(int projectPrjId) {
        this.projectPrjId = projectPrjId;
    }

    public int getUserUserId() {
        return userUserId;
    }

    public void setUserUserId(int userUserId) {
        this.userUserId = userUserId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) projectPrjId;
        hash += (int) userUserId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProjectHasUserPK)) {
            return false;
        }
        ProjectHasUserPK other = (ProjectHasUserPK) object;
        if (this.projectPrjId != other.projectPrjId) {
            return false;
        }
        if (this.userUserId != other.userUserId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bio.jpa.entities.ProjectHasUserPK[ projectPrjId=" + projectPrjId + ", userUserId=" + userUserId + " ]";
    }
    
}
